package com.cjl.demo.thread;

import java.util.concurrent.CompletableFuture;

/**
 * <p>Copyright: All Rights Reserved</p>
 * <p>Description: CompletableFutureDemo 测试</p>
 *
 * @ uthor chenjinliang
 * @ date: 2018/12/17
 */
public class CompletableFutureDemo {


    public void thenApply() {
        String result = CompletableFuture.supplyAsync(() -> "hello").thenApply(s -> s + " world").join();
        System.out.println(result);
    }


}
